package com.twu.biblioteca;

import java.io.PrintStream;
import java.util.Scanner;

public class UserInterface {

    private Scanner reader;
    private PrintStream writer;

    public UserInterface(Scanner reader, PrintStream writer) {
        this.reader = reader;
        this.writer = writer;
    }

    public void write(Output output) {
        writer.println(output.string());
    }

    public Input read() {
        return new Input(reader.nextLine());
    }

}
